<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>提现处理中</title>
<link href="../tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" />
<script type="../tablecloth/tablecloth.js"></script>
<script type="text/javascript" src="../Js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../Js/haidao.offcial.general.js"></script>
<script type="text/javascript" src="../Js/select.js"></script>
<script type="text/javascript" src="../Js/haidao.validate.js"></script>
<script src="../My97DatePicker/WdatePicker.js"></script>

<script type="text/javascript">
$(function(){init();});
function init() {
	var page = parseInt(document.form1.currentPage.value);
	var pageCount = parseInt(document.form1.pageCount.value);
	var count=parseInt(document.form1.count.value);
	if (page == 1 && pageCount!=1) {
		document.form1.pre1.disabled = "disabled";
		return;
	}
	if (page == count && pageCount!=1) {
		document.form1.next1.disabled = "disabled";
		return;
	}
	if (pageCount == 1) {
		document.form1.pre1.disabled = "disabled";
		document.form1.next1.disabled = "disabled";
		document.form1.first1.disabled = "disabled";
		document.form1.end1.disabled = "disabled";
		return;
	}
} 

function first() {
	window.location.href = "<%=request.getContextPath()%>/withdraw/withdraw.do?withdrawState=2&currentPage=1" + getQueryData();
	
}

function next() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/withdraw/withdraw.do?withdrawState=2&currentPage=" + (page + 1) + getQueryData();
}

function pre() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/withdraw/withdraw.do?withdrawState=2&currentPage=" + (page - 1) + getQueryData();
}

function end() {
	var pageCount = parseInt(document.form1.pageCount.value);
	window.location.href = "<%=request.getContextPath()%>/withdraw/withdraw.do?withdrawState=2&currentPage=" + pageCount + getQueryData();
}

//拼接查询条件
function getQueryData(){
	var submitTime1=$("#submitTime1").val();
	var submitTime2=$("#submitTime2").val();
	var userNO=$("#userNO").val();
	var moneyNO=$("#moneyNO").val();
	var orderNO=$("#orderNO").val();
	var userName=$("#userName").val();
	var bankCardNO=$("#bankCardNO").val();
	var channel=$("#channel").val();
	var bank=$("#bank").val();
	var loginAccount=$("#loginAccount").val();
	var queryper="&submitTime1="+submitTime1+"&submitTime2="+submitTime2+"&moneyNO="+moneyNO+"&bank="+bank+"&loginAccount="+loginAccount
	+"&bankCardNO="+bankCardNO+"&orderNO="+orderNO+"&userName="+userName+"&userNO="+userNO+"&channel="+channel;
	return queryper;
	}

</script>
</head>

<body>
	<div>
		<div class="view-product">
			<div class="message-manage">
				<div class="manage-record margin-lr">
				<form name="form1" method="get" action="<%=request.getContextPath()%>/withdraw/withdraw.do?withdrawState=2">
					<table border="0">
					<input type="hidden" name="withdrawState" id="withdrawState" value="2">
					    <tr><td>
				               借款编号： <input type="text" name="orderNO" id="orderNO" size="15" value="${orderNO}">&nbsp;&nbsp;
						名称： <input type="text" name="userName" id="userName" size="15" value="${userName}">&nbsp;&nbsp;
						登录账号： <input type="text" name="loginAccount" id="loginAccount" size="15" value="${loginAccount}">&nbsp;&nbsp;
						用户编号： <input type="text" name="userNO" id="userNO" size="15" value="${userNO}">&nbsp;&nbsp;
						提现订单号： <input type="text" name="moneyNO" id="moneyNO" size="30" value="${moneyNO}">&nbsp;&nbsp;
						</td></tr>
						<tr><td>
						提现渠道：<select name="channel" id="channel" >
						             <option value="">请选择</option>
						             <c:forEach items="${channelList}" var="c">
										 <c:choose>
											<c:when test="${c.value == channel}">
											    <option value="${c.value}" selected="selected">${c.valName}</option>
											</c:when>
											<c:otherwise>
												<option value="${c.value}">${c.valName}</option>
											</c:otherwise>
										</c:choose>
								     </c:forEach>
								 </select>&nbsp;&nbsp;
						提现银行：<select name="bank" id="bank" >
						             <option value="">请选择</option>
						             <c:forEach items="${bankList}" var="b">
										 <c:choose>
											<c:when test="${b.bankname == bank}">
											    <option value="${b.bankname}" selected="selected">${b.bankname}</option>
											</c:when>
											<c:otherwise>
												<option value="${b.bankname}">${b.bankname}</option>
											</c:otherwise>
										</c:choose>
								     </c:forEach>
								 </select>&nbsp;&nbsp; 
						银行卡号： <input type="text" name="bankCardNO" id="bankCardNO" size="15" value="${bankCardNO}">&nbsp;&nbsp;
				                申请时间：<input type="text" name="submitTime1" id="submitTime1" size="20"
			                            value="${submitTime1}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">&nbsp;
				                             至  <input type="text" name="submitTime2" id="submitTime2" size="20" 
				                        value="${submitTime2}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">&nbsp;&nbsp;
			            <input type="submit" id="addAction" value="筛选">&nbsp;&nbsp;</td>
			            </tr>
					</table>
					<div class="offcial-table margin-top clearfix">
						<div class="tr-th clearfix">
							<table width="100%" border="0">
								<thead>
									<tr>
									    <th>提现订单号</th>
										<th>借款编号</th>
										<th>用户编号</th>
										<th>名称</th>
										<th>登录账号</th>
										<th>提现金额</th>
										<th>提现手续费</th>
										<th>实际到账金额</th>
										<th>提现渠道</th>
										<th>提现银行</th>
										<th>银行卡号</th>
										<th>申请时间</th>
										<th>处理时间</th>
										
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${list}" var="u">
										<tr style="white-space: nowrap;">
											<td>${u.moneyNO}</td>
											<td>${u.orderNO}</td>
											<td>${u.userNO}</td>
											<td>${u.userName}</td>
											<td>${u.loginAccount}</td>
											<td>${u.withdrawMoney}</td>
											<td>${u.withdrawFee}</td>
										    <td>${u.actuaWithdrawMoney}</td>
										    <td>${u.channelName}</td>
											<td>${u.bankName}</td>
											<td>${u.bankCardNO}</td>
											<td>${u.submitTime}</td>
											<td>${u.processTime}</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
							<table><tbody><tr><td>
							    <input type="hidden" name="currentPage" value="${currentPage}" /> 
								<input type="hidden" name="pageCount" value="${pageCount}"/> 
								<input type="hidden" name="count" value="${count}"/>
								<input type="button" name="first1" value="首页" onclick="first()" class="button gray" /> 
								<input type="button" name="pre1" value="上一页" onclick="pre()" class="button green"/> 
								<input type="button" name="next1" value="下一页" onclick="next()" class="button blue"/> 
								<input type="button" name="end1" value="尾页" onclick="end()" class="button gray"/> 
								<font>第${currentPage}页, 共${pageCount}页,共${count}条数据</font>
							</td></tr></tbody></table>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>

</html>